﻿namespace BlamanticUI.Components;

/// <summary>
/// Render a tr HTML tag to display a new row in table.
/// </summary>
[HtmlTag("tr")]
public class TableRow : BlazorChildComponentBase<Table>,IHasChildContent, IHasState, IHasActive, IHasDisabled, IHasColor, IHasHorizontalAlignment, IHasVerticalAlignment
{
    /// <summary>
    /// A segment of UI content to render.
    /// </summary>
    [Parameter] public RenderFragment? ChildContent { get; set; }
    /// <summary>
    /// Gets or sets the marker style of border in cell.
    /// </summary>
    [Parameter] [CssClass(" marked", Suffix = true)] public HorizontalPosition? Marked { get; set; }
    /// <summary>
    /// Gets or sets the state of row.
    /// </summary>
    [Parameter] public State? State { get; set; }
    /// <summary>
    /// Gets or sets a value indicating whether this state is actived.
    /// </summary>
    /// <value>
    ///   <c>true</c> if actived; otherwise, <c>false</c>.
    /// </value>
    [Parameter] public bool Active { get; set; }
    /// <summary>
    /// Gets or sets a value indicating whether row is disabled.
    /// </summary>
    /// <value>
    ///   <c>true</c> if disabled; otherwise, <c>false</c>.
    /// </value>
    [Parameter] public bool Disabled { get; set; }
    /// <summary>
    /// Gets or sets the color of row.
    /// </summary>
    [Parameter] public Color? Color { get; set; }
    /// <summary>
    /// Gets or sets a callback method to invoke after <see cref="Disabled" /> changed.
    /// </summary>
    [Parameter] public EventCallback<bool> OnDisabled { get; set; }
    /// <summary>
    /// Gets or sets the a callback method whether active state has changed.
    /// </summary>
    [Parameter] public EventCallback<bool> OnActive { get; set; }
    /// <summary>
    /// Gets or sets the vertical alignment of text.
    /// </summary>
    [Parameter] public VerticalAlignment? VerticalAlignment { get; set; }
    /// <summary>
    /// Gets or sets the horizontal alignment of text.
    /// </summary>
    [Parameter] public HorizontalAlignment? HorizontalAlignment { get; set; }
}
